import axios from 'axios';

import css from './../styles/fetch.scss';
const About = ({ list }) => {
    return (
        <ul className={css.list}>
            {list.map((item, index) => (
                <li key={item.song_id}>
                    {item.album_title}--{item.author}
                </li>
            ))}
        </ul>
    );
};
About.getInitialProps = async () => {
    const res = await axios.get(
        'https://www.mxnzp.com/api/music/recommend/list '
    );

    return { list: res.data.data, title: '每日音乐推荐' };
};
export default About;
